{% extends '::base.html.twig' %}

{% block body %}
    <h1>{% trans %}global.forum{% endtrans %}</h1>

    <form action="{{ path('MeestersForumBundle_TopicUpdate', { 'id': topic.id }) }}" method="post" {{ form_enctype(edit_form) }}>
        <h2>{% trans %}topic.form.header.edit{% endtrans %}</h2>
        {{ form_widget(edit_form) }}
        <p>
            <button type="submit">{% trans %}global.button.edit{% endtrans %}</button>
        </p>
    </form>

    <ul class="record_actions">
        <li>
            <a href="{{ path('MeestersForumBundle_ForumShow', {'id': topic.forum.id}) }}">
                Back to the list
            </a>
        </li>
        <li>
            <form action="{{ path('MeestersForumBundle_TopicUpdate', { 'id': topic.id }) }}" method="post">
                {{ form_widget(delete_form) }}
                <button type="submit">{% trans %}global.button.delete{% endtrans %}</button>
            </form>
        </li>
    </ul>
{% endblock %}